import { useHistory } from "react-router-dom";
import React, { Fragment, useState } from "react";
import { AppstoreOutlined, PicRightOutlined } from "@ant-design/icons";
import { Input, Button, Tabs } from "antd";
const { TabPane } = Tabs;

function Groupdiscount() {

    const [search, setSearch] = useState("");
    
    const iptChange = (e) => {
        // console.log(e.target.value);
        setSearch(e.target.value);
    };
    const callback = (key) => {
      console.log(key);
    }
    return (
      <Fragment>
        <h1 className="title">拼团折扣</h1>
        <div className="group_search">
          <div className="search_head">
            <AppstoreOutlined />
            筛选
          </div>
          <Input
            placeholder="输入名称"
            className="ipt"
            onChange={iptChange}
          ></Input>
          <Button type="danger">筛选</Button>
        </div>
        <div className="groups2">
          <PicRightOutlined />
          活动列表
          <Button
            type="default"
            danger
            className="newAct"
            // onClick={() => props.history.push("/promotion/addactivity")}
          >
            新增团购
          </Button>
        </div>
        <Tabs defaultActiveKey="1" onChange={callback}>
          <TabPane tab="全部" key="1">
            Content of Tab Pane 1
          </TabPane>
          <TabPane tab="进行中" key="2">
            Content of Tab Pane 2
          </TabPane>
          <TabPane tab="未开始" key="3">
            Content of Tab Pane 3
          </TabPane>
          <TabPane tab="已结束" key="4">
            Content of Tab Pane 4
          </TabPane>
        </Tabs>
      </Fragment>
    );
}

export default Groupdiscount
